<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>测试数据</title>
</head>
<body>
   <div class="wrapper">
       <div id="show">

       </div>
   </div>
</body>
<script src="web/jquery.min.js"></script>
<script>
    var ws = new WebSocket('ws://47.93.11.237:8005');
    ws.onopen = function(){
        var uid = 'uid1';
        ws.send(uid);
    };
    setInterval(function () {
        var date =  new Date();
        ws.send(date.toLocaleString());
    },5000);
    ws.onmessage = function(e){
        var html = '<p>'+e.data+'</p>';
        $('#show').append(html);
    };
</script>
</html>





